<template>
    <div class="news-detail">
        <van-nav-bar title="消息详情" left-arrow @click-left="goBack"/>
        <div class="contian">
            <div>{{msg}}</div>
            <div>{{time}}</div>
        </div>
    </div>
</template>
<script>
import Vue from "vue"
import axios from "axios"
import {
    NavBar
} from "vant"
export default {
    components: {
        [NavBar.name]: NavBar,
    },
    data() {
        return {
            id:this.$route.params.id,
            msg:this.$route.params.msg,
            time:this.$route.params.time,
        }
    },
    created() {
        console.log(this.$route.params.id,888)
        this.clickId();
    },
    mounted(){
        
    },
    methods: {
        clickId(){
            var that = this
            $.ajax({
                type:'post',
                dataType:'json',
                url:window.nowHref + '/message/haveRead',
                data:{
                    messageId:this.$route.params.id
                },
                success:function(data){
                    console.log(data)
                }
            })
        },
        //返回上一页
        goBack() {
            this.$router.go(-1);
        },
    }
}
</script>
<style lang="less" scoped>
@import "../../../assets/less/variable.less";
.contian{
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;    
    div:nth-child(1){
        width: 60%;
        text-align: left;
        font-size: 14px;
    }
    div:nth-child(2){
        width: 40%;
        text-align: right;
        font-size: 10px;
        color: #999;
    }
}
</style>